package club.cearnach.api.service;

import club.cearnach.api.dto.NewsDTO;
import club.cearnach.entity.News;
import club.cearnach.api.exception.MovieNewsException;
import club.cearnach.api.exception.MoviePathException;
import club.cearnach.api.form.PageBean;
import org.springframework.data.domain.Page;

import java.io.IOException;

/**
 * @author 阮胜
 * @date 2018/5/17 14:49
 */
public interface INewsService {
    Page<News> findAllOrderByCreateDateDesc(PageBean pageBean);


    News save(NewsDTO newsDTO) throws IOException, MoviePathException;

    void delete(Integer id) throws MovieNewsException;

    long deleteIn(Integer[] idArr);

    News findById(Integer id) throws MovieNewsException;

    Long count();

    News findLastNews();
}
